/**
 * Vision library is a simplified Processing interface for JavaCV:
 * http://code.google.com/p/javacv/
 *
 * ##copyright##
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA  02111-1307  USA
 * 
 * @author		##author##
 * @modified	##date##
 * @version		##version##
 */

package codeanticode.vision;

import processing.core.*;
import com.googlecode.javacpp.Loader;
import com.googlecode.javacv.cpp.opencv_objdetect;
import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_calib3d.*;
import static com.googlecode.javacv.cpp.opencv_objdetect.*;

/**
 * The base class that does some general initialization 
 *
 */
public class Vision {
	PApplet parent;
	protected static int LIB_COUNT = 0;
	public final static String VERSION = "##version##";

	public Vision(PApplet parent) {		
	  this.parent = parent;	  
	  if (LIB_COUNT == 0) {
		  Loader.load(opencv_objdetect.class);		  
		  welcome();
	  }
	  LIB_COUNT++;
	}
	
	
	private void welcome() {
		System.out.println("##name## ##version## by ##author##");
	}
	

	/**
	 * Return the version of the library.
	 * 
	 * @return String
	 */
	public static String version() {
		return VERSION;
	}
}

